package com.zrwl.poscloud.core.restapi.file.viewApi;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zrwl.poscloud.base.entity.FileInfo;
import com.zrwl.poscloud.commons.utils.ResultUtil;
import com.zrwl.poscloud.xo.service.FileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/fileIndexApi")
public class FileIndexApi {
    @Autowired
    FileInfoService fileInfoService;


    //页面请求查询本地备份记录
    @RequestMapping("/getFileInfoListForIndex")
    public String getFileInfoListForIndex(int currentPage, int pageSize) {
        IPage<FileInfo> pageList = null;
        try {
            pageList = fileInfoService.getFileInfoList(currentPage, pageSize);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ResultUtil.successWithData(pageList);
    }

}
